﻿@model S4Store.Models.Markting.HDJHModel
@{
    Layout = null;
    ViewBag.Title = "HDJH";

    S4Store.Models.Chart.Column ChartModel = new S4Store.Models.Chart.Column();
    ChartModel.Name = "活动效果KPI概况";
    ChartModel.YAxis = "比率(%)";
    ChartModel.XAxis.Add("主题活动贡献度");
    ChartModel.XAxis.Add("店头活动成功邀约率");
    
    S4Store.Models.Chart.ChartSeries series1 = new S4Store.Models.Chart.ChartSeries();
    series1.Name = "目标";
    series1.Data.Add(Model.Report.ExhibitionKpiStandard.ZTHDJKGXD);
    series1.Data.Add(Model.Report.ExhibitionKpiStandard.DTHDYYCGLV);
    
    ChartModel.Serieses.Add(series1);

    S4Store.Models.Chart.ChartSeries series2 = new S4Store.Models.Chart.ChartSeries();
    series2.Name = "实际";
    series2.Data.Add(Model.Report.ZTHDJKGXD);
    series2.Data.Add(Model.Report.ZTHDYYCGLV);
   
    ChartModel.Serieses.Add(series2);

    List<S4Store.Models.Chart.AdvIndex> AdvIndexs = new List<S4Store.Models.Chart.AdvIndex>();
    S4Store.Models.Chart.AdvIndex index1 = new S4Store.Models.Chart.AdvIndex();
    index1.Size = S4Store.Models.Chart.AdvIndex.IndexSize.Big;
    if ((Model.Report.ZTHDXZJKS - Model.Report.ZTHDMBTXS) >= 0)
    {
        index1.Type = S4Store.Models.Chart.AdvIndex.IndexType.Green;   
    }else{
        index1.Type = S4Store.Models.Chart.AdvIndex.IndexType.Red;   
    }
    
    index1.Url = Url.Action("ZTHD");
    index1.Tip = "主题活动执行KPI";

    index1.Title = "主题活动实际集客数与主题活动目标集客数的差值";
    index1.Item1Name = "主题活动实际集客数";
    index1.Item1Value = Model.Report.ZTHDXZJKS.ToString();
    index1.Item2Name = "主题活动目标集客数";
    index1.Item2Value = Model.Report.ZTHDMBTXS.ToString();

    index1.Value = (Model.Report.ZTHDXZJKS - Model.Report.ZTHDMBTXS).ToString();
    AdvIndexs.Add(index1);

    S4Store.Models.Chart.AdvIndex index2 = new S4Store.Models.Chart.AdvIndex();
    index2.Size = S4Store.Models.Chart.AdvIndex.IndexSize.Big;
    if (Model.Report.DTHDCGYYSDiff >= 0)
    {
        index2.Type = S4Store.Models.Chart.AdvIndex.IndexType.Green;
    }
    else
    {
        index2.Type = S4Store.Models.Chart.AdvIndex.IndexType.Red;
    }
    index2.Value = Model.Report.DTHDCGYYSDiff.ToString();
    index2.Url = Url.Action("DTHD");
    index2.Tip = "店头活动执行KPI";

    index2.Title = "店头活动实际邀约数与店头活动目标邀约数的差值";
    index2.Item1Name = "店头活动实际邀约数";
    index2.Item1Value = Model.Report.DTHDCGYYS.ToString();
    index2.Item2Name = "店头活动目标邀约数";
    index2.Item2Value = Model.Report.DTHDMBYYS.ToString();
    AdvIndexs.Add(index2);
}
<div style="height:100%; overflow:auto">
@Html.Action("ReportBar", "Common", Model.BarModel)
<div style="position:relative; width:100%">
      
        @Html.Partial("../Chart/Column", ChartModel)
        @Html.Partial("../Chart/AdvIndex", AdvIndexs)
    
</div>
</div>


